- /* swhatime.cpp by K.Tsuru */
- #include <stdlib.h>
- #include <time.h>
- #include <sstream>
- using namespace std;
- string WhatTimeNow() { // return the present time in string hh:mm:ss
- time_t st = time(NULL);
- struct tm *pnow = localtime(&st);
- stringstream now;
- now.width(2); now.fill('0');
- now << pnow->tm_hour << ':' << pnow->tm_min << ':' << pnow->tm_sec;
- return (string)now.str();
- }
-
swhatime.cpp : last modifiled at 2017/04/10 10:10:40(402 bytes)
created at 2017/10/03 15:04:05
The creation time of this html file is 2017/10/07 10:54:16 (Sat Oct 07 10:54:16 2017).